Image processing system to control vehicle headlamps or other vehicle equipment

ABSTRACT

An imaging system of the invention includes an image array sensor including a plurality of pixels. Each of the pixels generate a signal indicative of the amount of light received on the pixel. The imaging system further includes an analog to digital converter for quantizing the signals from the pixels into a digital value. The system further includes a memory including a plurality of allocated storage locations for storing the digital values from the analog to digital converter. The number of allocated storage locations in the memory is less than the number of pixels in the image array sensor. According to another embodiment, an imaging device includes an image sensor having a plurality pixels arranged in an array; and a multi-layer interference filter disposed over said pixel array, said multi-layer interference filter being patterned so as to provide filters of different colors to neighboring pixels or groups of pixels.

BACKGROUND OF THE INVENTION

[0001] The present invention generally relates to image processingsystems, and more particularly, to image processing systems used tocontrol vehicle equipment, such as vehicle headlamps, windshield wipers,etc.

[0002] Recently, many vehicular control accessories utilizing imageprocessing systems have been proposed. For example, U.S. Pat. No.5,837,994 entitled “Control System to Automatically Dim Vehicle HeadLamps,” commonly assigned with the present invention and herebyincorporated by reference, discloses a control system which utilizes animage sensor and a processor to detect the headlamps of other vehiclesat night and automatically control the state of the high beam headlampsof a vehicle. Another example of an image processing system to controlvehicle equipment is given in U.S. Pat. No. 5,923,027 entitled “MoistureSensor and Windshield Fog Detector,” also commonly assigned with thepresent invention and hereby incorporated by reference. This patentdiscloses an image processing system, which acquires images of a vehiclewindshield in order to detect the presence of rain or fog.

[0003] In each of these systems, as well as several other disclosedautomotive image processing systems (see, for example, U.S. Pat. Nos.5,765,116, 5,675,489, and 5,660,454 and PCT Published Patent ApplicationNo. WO 00/53465), images are acquired by an image sensor and stored intoa memory in their entirety for subsequent processing. While technicallyvery convenient, the use of this amount of image memory presentsproblems when adapting the system for commercial use, especially in thehighly cost-sensitive automotive market. Most low cost microcontrollersor digital signal processors (DSPs) suitable for these types ofapplications are equipped with only a few hundred bytes to a fewkilobytes of random access memory (RAM) into which the images can bestored. The processing core of many microcontrollers is typicallyavailable with a variety of RAM configurations, with the priceincreasing as the amount of memory increases. Therefore, it isadvantageous to use a microcontroller with the least amount of RAMpossible. The use of a small amount of RAM in prior art systems limitsthe size of the image, which can be stored and thus greatly limits theresolution.

[0004] A common off-the-shelf image sensor may have 352×288 pixels,known as the CIF format. Storing an entire image from this sensorrequires approximately 100 kilobytes of RAM—far more than is typicallyavailable on a low cost microcontroller. Some microcontrollers have theability to increase the amount of RAM available by the addition of anexternal memory chip. These microcontrollers must have an externalmemory bus, increasing the pin count and thus the cost and complexity ofthe microcontroller and the circuit board to which it is attached. Thecost of the external memory itself must also be considered, and despiterapid memory price declines, this cost is anticipated to remainsignificant for some time to come. Finally, if an image must betransferred to memory before it can be processed, the total timerequired to acquire and analyze an image will be greater than if theanalysis could occur simultaneously with the acquisition.

[0005] What is needed is a low cost image processing system to controlautomotive equipment which is capable of analyzing images without firststoring them to memory, thus reducing the total amount of memoryrequired in the system.

SUMMARY OF THE PRESENT INVENTION

[0006] The present invention solves the problem of the prior art byproviding an image processing system, which does not require a memorywith enough storage locations to store the digital grayscale value ofevery pixel in the image. The system contains an image sensor arraycontaining a plurality of pixels, each of which is configured to providean output indicative of the amount of light received by the pixel overthe exposure time. The system also provides an analog-to-digital (A/D)converter to quantize the signal from the pixel into a digital grayscalevalue. The system also provides a processor in communication with theimage sensor and A/D converter to analyze the images acquired by theimage processor and control vehicle equipment based upon the results ofprocessing the images. Finally, the system contains a memory for storingthe grayscale value of some of the pixels and for storing other dataused by the processor. By providing an image processing system with lessavailable memory than is needed to store all pixels, the cost and thecomplexity of the image processing system can be reduced.

[0007] According to one aspect of the present invention, the amount ofmemory required is reduced by acquiring and analyzing only a portion ofthe image at a given time. This may be accomplished by acquiring asingle row of pixels at a time or by acquiring a subwindow of pixels,which is a subset of the window containing all the pixels.

[0008] In another aspect of the present invention, a digital imageprocessing filter is implemented by only storing a most recent group ofpixels and performing the filter algorithm on this group of pixels. Themost recent group of pixels may be, for example, the last few rows ofthe image received. The system performs the filter algorithm on the lastfew acquired rows and discards the oldest row as a new row is acquired.

[0009] In another aspect of the invention, some of the pixel valuesreceived by the processor are discarded as they are received and only asubset of the values is stored in the memory. Pixels may be discarded ata uniform rate throughout the image or at a non-uniform rate. Forexample, pixels may be discarded at a high rate near the periphery ofthe image and at a low or zero rate near the center of the image toprovide a greater resolution near the center of the image.

[0010] In another aspect of the invention, the values of adjacent pixelsmay be averaged with one another and a single value stored in memoryrepresenting the average of several adjacent pixels. The number ofpixels averaged with each other may be uniform throughout the image ormay be non-uniform. Many pixels may be averaged with each other near theperiphery of the image and few or zero pixels may be averaged with eachother near the center of the image to provide a greater resolution nearthe center of the image.

[0011] In another aspect of the invention, objects identified in theimage may be extracted from the image and stored as the image is beingacquired. For example, the present invention may be used to identifyheadlamps of oncoming vehicles in order to determine the high beam stateof the headlamps of the controlled vehicle. The present invention canidentify the presence of an oncoming headlamp in the image as it isbeing acquired and store various information about the headlamp in anobject list.

[0012] In another aspect of the present invention, the image data may becompressed as it is being acquired. This compression is accomplished bymany ways including reducing the number of quantization levels (bitdepth) of a pixel value as it is being received. Reducing bit depth ofthe image may be performed either uniformly or non-uniformly across theimage and by requantizing either linearly or non-linearly. This aspectof the present invention is particularly useful for reducing data ratewhen the camera is positioned away from the processor.

[0013] In another aspect of the present invention, image data is reducedby storing segments of connected pixels, which together make up anobject of interest. For example, a string of connected pixels in one rowof an image, all with grayscale values above a threshold, may be storedas one object. Rather than storing the grayscale values of each pixel,only the starting and ending pixels and the cumulative grayscale valueof all the pixels are stored. In a color implementation, the averagecolor of the segment may be stored. Finally, two dimensional groups ofobjects may also be stored. This aspect is particularly useful forgreatly reducing the memory requirements and transmitting image datawith the least possible overhead. The processing to reduce the image toa list of segments may be contained in the image sensor itself, in acompanion processor (ASIC, microcontroller, DSP or the like) near theimage sensor, or in the main processor.

[0014] In another aspect of the present invention a color image sensoris used to detect color information about an object in the scene. Inthis embodiment, multi-layer thin film interference filters are placedover each pixel in a checkerboard or mosaic pattern such that adjacentpixels are exposed to different spectral bands of light. The use ofmulti-layer thin film interference filters allows the implementation ofa color imaging system in an automotive environment. Typical polymercolor filters would be degraded by direct focusing of the sun onto thearray which will occur when the vehicle is traveling or is parked suchthat the camera is in direct view of the sun.

[0015] To achieve these and other aspects and advantages, the imagingsystem of the present invention comprises an image array sensorincluding a plurality of pixels, each of the pixels is operable togenerate a signal indicative of the amount of light received on thepixel; an analog to digital converter for quantizing the signals fromthe pixels into a digital value; and a memory including a plurality ofallocated storage locations for storing the digital values from theanalog to digital converter, wherein the number of storage locations inthe allocated memory is less than the number of pixels in the imagearray sensor.

[0016] According to another embodiment of the present invention, acontrol system is provided to control the headlamps of a vehicle. Thecontrol system comprises: an image array sensor including a plurality ofpixels, each of the pixels is operable to generate a signal indicativeof the amount of light received on the pixel; an optical systemconfigured to image the scene forward of the controlled vehicle onto theimage array sensor; an analog to digital converter for quantizing thesignals from the pixels into a digital value; and a control circuit forprocessing the image of the scene obtained from the imaging system andfor controlling the brightness of the headlamps in response to objectsdetected in the processed scene. The control circuit including a memoryincluding a plurality of allocated storage locations for storing thedigital values from the analog to digital converter, wherein the numberof allocated storage locations in the memory is less than the number ofpixels in the image array sensor.

[0017] According to yet another embodiment of the present invention, acontrol system is provided to control the headlamps of a vehicle. Thecontrol system comprises: an image array sensor including a plurality ofpixels, each of the pixels is operable to generate a signal indicativeof the amount of light received on the pixel; an optical systemconfigured to image the scene forward of the controlled vehicle onto theimage array sensor; and a control circuit for processing the image ofthe scene obtained from the imaging system and for controlling thebrightness of the headlamps in response to objects detected in theprocessed scene, wherein the control circuit generates a segment listidentifying segments of adjacent ones of the pixels that generate asignal having a grayscale value above a threshold as the signals arereceived from the pixels.

[0018] According to another embodiment of the present invention, aninside rearview mirror assembly for a vehicle comprises: a mirror mountadapted to be mounted inside the vehicle in a location proximate to oron the front windshield of the vehicle; a mirror bezel coupled to themirror mount; a mirror mounted in the mirror bezel; an imaging systemmounted to the mirror mount and configured to image the scene forward ofthe vehicle; and a control circuit electrically coupled to the imagingsystem for processing the image of the scene obtained from the imagearray sensor and for performing predetermined function in response toobjects detected in the processed scene, wherein at least a portion ofthe control circuit is mounted to the mirror mount.

[0019] According to still another embodiment of the present invention,an imaging system for a vehicle is provided that comprises: an imagearray sensor; an optical system configured to image the scene forward ofthe controlled vehicle onto the image array sensor; and a controlcircuit coupled to the image array sensor for processing the image ofthe scene obtained from the image array sensor to control the vehicleheadlamps in response to objects detected in the processed scene, thecontrol circuit further processes the scene obtained from the imagearray sensor to perform at least one of the following functions: (a) togenerate a collision avoidance warning; (b) to control the speed of thevehicle; and (c) to generate a lane departure indication signal.

[0020] These and other features, advantages, and objects of the presentinvention will be further understood and appreciated by those skilled inthe art by reference to the following specification, claims, andappended drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In the drawings:

[0022]FIG. 1 is an electrical circuit diagram in block form showing theimage processing system 100 of the present invention;

[0023]FIG. 2 is a cross-sectional view of a rearview mirror assembly inwhich the image processing system of the present invention may beimplemented;

[0024]FIG. 3 is a flow chart illustrating the image reading andprocessing portion of the first embodiment that develops the segmentlist;

[0025]FIGS. 4A and 4B are a flow chart illustrating the image receptionand processing phase by which an object list is created in accordancewith a first embodiment of the present invention; and

[0026]FIGS. 5A and 5B are a block diagram illustrating the flow of datain accordance with an image processing routine according to a secondembodiment of the invention.

DETAILED DESCRIPTION OF THE PRESENT INVENTION

[0027] Referring to FIG. 1, the image processing system 100 of thepresent invention includes at least one image array sensor 101. Theimage array sensor may be of a variety of types such as a CMOS activepixel sensor, a Charge Coupled Device (CCD), or any other type ofelectronic image sensor capable of sensing light in the visible, UV,near-IR or far-IR spectral bands. The image sensor 101 contains an arrayof pixels 102 onto which an image of a scene is formed by a lens. Thepixels are exposed to light over for a predetermined exposure time afterwhich a voltage signal is present on the pixel indicative of the amountof light received. This voltage is then quantitized by the A/D converter103 resulting in a digital grayscale value indicative of the amount oflight received on the pixel. AID converters for this purpose typicallyquantize the pixel signals into 256 levels or 8 bits. However, differentbit depths are frequently used and applicable to the present invention.Timing and control circuitry 104 provides all the signaling and timingnecessary to operate the image sensor and transmit grayscale values toprocessor 105. An example of timing and control circuitry suitable forthe present invention is given in U.S. Pat. No. 5,990,469 entitled“Control Circuit for Image Array Sensors” to Bechtel et al., commonlyassigned with the present invention and hereby incorporated byreference.

[0028] Images acquired by image sensor 101 are transmitted to theprocessor 105 over bus 107. The processor 105 may be of a variety oftypes such as a microcontroller, digital signal processor (DSP), fieldprogrammable gate array (FPGA), application specific integrated circuit(ASIC), or the like. An appropriate processor for the implementation ofseveral aspects of the present invention is a microcontroller of theMCS912 family available from Motorola. The bus 107 can also be of avariety of types, for example bus 107 may be a three wire serialinterface which communicates image exposure instructions from processor105 to the timing and control circuit 104 and communicates image datafrom image sensor 101 to processor 105, such as is described in the '469patent. Alternatively, bus 107 may be a parallel bus for communicatingimage data with image control parameters communicated on the same linesor separate signal lines. Bus 107 could also carry analog signals suchas the common NTSC video signal. Bus 107 could be implemented by using awireless network, by using a MOST bus, using an IEEE-1394 bus, a CANbus, or by using a bus conforming to the AMI-C specification. In thiscase, the conversion from analog to digital signals would occur on theprocessor side of bus 107.

[0029] In prior art systems, images received by processor 105 would bestored to memory 106 in their entirety. In the present invention, imagedata may be processed as the image data is being received by processor105 and the results of this processing may be stored in memory 106.Memory 106 may be integral to processor 105 or external to theprocessor. The present invention provides the advantage of performingmany of the analysis tasks necessary to control vehicle equipmentutilizing the amounts of memory which are typically integrated with manycommon microcontrollers and DSPs.

[0030] Image sensor 101, A/D converter 103, and timing and controlcircuitry 104 are preferably made integral on the same monolithicdevice. Optionally, processor 105 and/or memory 106 may also be madeintegral with image sensor 101, A/D converter 103, and timing andcontrol circuit 104. Alternatively, any or all of the above componentsmay be made as separate devices or any of the above components may bemade integral with any other component as is convenient for the specificimplementation of the invention. Finally, components other than thoselisted or multiple instances of the components listed either may bepresent as discrete components or combined integrally with othercomponents.

[0031] The image processing system 100 of the present invention can beadvantageously integrated into a rearview mirror assembly 200 asillustrated in FIG. 2, wherein the image sensor 101 is integrated intoan automatic dimming electrochromic (EC) mirror subassembly 205, orother variable reflectance mirror assembly. This location provides anunobstructed forward view of a scene forward of the vehicle through aregion of the windshield 220 of the vehicle that is typically cleaned bythe vehicle's windshield wipers (not shown). Additionally, mounting theimage sensor in the mirror assembly permits sharing of circuitry such asthe power supply, microcontroller, and light sensors. More specifically,the same ambient light sensor may be used to provide an ambient lightmeasurement for both the auto-dimming mirror function and the headlampcontrol function.

[0032] This embodiment is useful for automatic control of vehicleheadlights, for imaging a region of a windshield 220 to detect rain, orany other application where a forward view of a vehicle is useful tocontrol vehicle equipment.

[0033] Referring to FIG. 2, image sensor 101 is mounted within arearview mirror mount 207, which is mounted to the vehicle windshield220. The rearview mirror mount 207 provides an opaque enclosure forimage sensor 101. An infrared filter 206 may be mounted over a hole 208in the rearview mirror mount 207, as is shown. Light from the scene tobe imaged passes through hole 208 and infrared filter 206 and impingesupon a lens 201. Lens 201 forms an image of the forward scene onto imagearray 101. Image sensor 101 is mounted onto a camera circuit board 202.Camera circuit board 202 is mounted to rearview mirror mount 207 usingmounting brackets 212. The mounting brackets may be implemented usingany suitable construction, such as metal brackets; plastic brackets,which can be formed either integrally with housing 207 or as separatecomponents; mechanical fasteners that engage camera circuit board 202;or the like. Separate brackets can be attached using an adhesive, metalfasteners, or other mechanical fastening means. Image sensor 101 is thusattached to, and held stationary by, rearview mirror mount 207, which issecurely attached to the vehicle windshield 220 or the vehicle roof byconventional means.

[0034] As also shown in FIG. 2, a mirror circuit board 203 may beprovided in mirror housing body 210 (i.e., the mirror bezel) on whichprocessor circuit 105 may be mounted. Processor 105 and image sensor 101are electrically coupled by a bus 107, which is attached to cameracircuit board 202 by means of a connector 214.

[0035] Bus 107 may be constructed as a multi-wire cable, which providesbus signals as well as power, ground, and clock signals to cameracircuit board 202. This cable may be formed from conventionalmulti-conductor wire, shielded cable, or as a flex circuit; the last ofwhich may be especially advantageous if bus 107 is a parallel busrequiring multiple connections. Processor 105 may alternatively bepositioned on camera circuit board 202 (or integrated into the imagesensor) and another cable could be connected to mirror circuit board 203if mirror assembly 200 contains additional electronic functions, such aselectrochromic auto dimming mirror, a compass, etc.

[0036] Another method to reduce the complexity of the bus cable 107,particularly if the bus 107 is a parallel bus, is to position anotherprocessor 105′ or logic circuit on camera circuit board 202 while mainprocessor 105 is remotely located such as in the mirror body orelsewhere in the vehicle. Communication between the image sensor, secondprocessor, and main processor may be serial or parallel. In a preferredembodiment, communication between the image sensor and the secondprocessor 105′ is parallel and communication between the two processorsis serial. Optionally, second processor 105′ may perform some of theprocessing functions described hereinafter. The use of a secondprocessor may facilitate the use of an off-the-shelf image sensor whichotherwise may have too many control and data signals to convenientlycommunicate over a cable between the body 210 and mount 207 of a mirrorassembly 200.

[0037] Headlamp control and rain sensing may also be accomplished usingtwo separate cameras in the mirror mount but using only one processor.In this case, both cameras could share the same bus to communicate withthe main processor. This allows substantially different optics optimizedfor each application to be used with each image sensor.

[0038] Information determined by processor 105 or decisions made byprocessor 105 may be communicated with vehicle equipment over a vehiclewiring harness 108. Vehicle wiring harness 108 may be implemented in avariety of ways including a dedicated point-to-point signal to thecontrolled vehicle equipment or by the use of a multiplexed vehicle bussuch as the CAN bus or J1850 bus. Such a vehicle wiring harness 108 maybe used as a power and communication link with vehicle components suchas headlamps, windshield wipers, and other displays or warning orcontrol subsystems within the vehicle.

[0039] In an embodiment of the present invention, the required allocatedmemory necessary to process images from image sensor 101 is reduced byanalyzing only particular regions or windows of the image at a time. Byacquiring only a particular subwindow at a given time, only enoughallocated memory to store that particular subwindow is required. Eachsubwindow is acquired and processed individually until the entire imagearea, or whatever subset of the entire area is desired, is processed.The subwindow may be of a variety of sizes depending on the application.The subwindow may be a single or row, a single column, or anyrectangular or square region of pixels.

[0040] The advantages of processing select subwindows are many. Forexample, different processing parameters may be applied to differentregions of the image by varying the process parameters with eachsubwindow used. Different exposures may be used for differentsubwindows. This is particularly important when imaging a scene duringthe day, as is required for a rain sensor. Normally a high dynamic rangeimage sensor is necessary to properly expose regions of the scene aboveand below the horizon since the brightness of the scene above thehorizon is typically substantially higher than that below the horizon.However, by using different subwindows for regions above and below thehorizon, different exposures can be used allowing each region to beproperly exposed.

[0041] Several imaging processing tasks involve the use of digitalfilters to quantify frequency components of an image, detect edges, orother similar functions. These filters are typically implemented by useof a kernel—a matrix of coefficients to multiply pixels in a regionsurrounding the current pixel in order to extract information about thepixel. This can be described mathematically by the following kerneltable and expression:

[0042] A pixel grayscale value is represented by Val(x,y), where x and yare the coordinates of the current pixel. The value of the pixel in anew image created by applying the filter kernel to an existing image is:

A*Val(x−1,y−1)+B*Val(x,y−1)+C*Val(x+1,y−1)+D*Val(x−1,y)+E*Val(x,y)+F*Val(x+1,y)+G*Val(x−1,y+1)+H*Val(x,y+1)+I*Val(x+1,y+1)

[0043] As an example, a high pass filter can be implemented by settingthe coefficients A, C, G & I to 0; D, B, F & H to −1; and E to 4. Otherfilters, which can be implemented with kernels using more complexprocedures, include edge filters such as the Sobel or Roberts edgefilters. Finally, the use of a 3×3 kernel is only exemplary. Largerkernels or non-square kernels are also applicable.

[0044] In many applications of the present invention, it is not actuallynecessary to create a new image by using the filter but rather toquantify the total high or low frequency components of an image orsubwindow of an image. Alternatively it may be useful to detect edges inan image and store only their location or the number of edges ratherthan to create a new image. In this case, it is possible to reduce thememory required to process images by performing the filtering as theimage is received. Memory is needed only to store one or a few rows ofthe image at a time. If a 3×3 kernel is used, three rows worth of memorycan be used to store pixel values while the kernel is being executed.After the kernel has been executed across the second row of the image, afourth row can be received and the first row can be discarded. Theresult of the kernel being applied to the second row can be tallied inanother memory location. This result may be a sun of all the results ofthe kernel, a location of high or low frequency components, edgelocations, or the like. This process continues over the entire imagewhile it is being received from imager 101.

[0045] In another embodiment, only select pixels are stored into memory106 as the image is being received. For example, in an automaticheadlamp control system, it may not be necessary to have a very highresolution image. If a standard off-the-shelf image sensor is beingused, such as a CIF format sensor, there may far more pixels than arerequired to produce an adequately functioning system. Rather thanincrease the cost of the system by including adequate memory to storethe entire image, the memory requirements may be reduced by discardingsome of the pixels as they are received. In a simple implementation,this may involve simply storing only the n^(th) pixel received, where nis a number dependent on the resolution of the sensor and the number ofpixels actually required to achieve adequate performance. With a CIFsensor n may be, for example, 3. Alternatively, n pixels may be averagedto produce a smaller image. This can occur in both vertical andhorizontal directions and n×n pixels may be averaged into a singlevalue,

[0046] In another embodiment, n is not a uniform number throughout theimage. In an automatic headlamp control system, it is useful to have agreater resolution near the center of the image corresponding to thedirection where a vehicle's high beams are most intense. This enablesmore accurate detection of faint and small light sources in this centralzone. Farther off axis, only bright and large objects may need to bedetected. To accomplish a variable resolution image, the value of n isincreased off-axis and reduced near the center. Off-axis pixels may beaveraged or skipped. Near the center, n may be 1 and every pixel may bestored.

[0047] According to one embodiment of the present invention, the imageprocessing system may be used for automatic headlamp control. Automaticheadlamp control systems typically are used to change the beamillumination pattern produced by the vehicle headlamps. The illuminationpattern may be varied in response to detected light sources to the frontof the vehicle, by varying the aim, brightness, and/or focus of theheadlamps and/or selectively activating different combinations ofexterior lights functioning as headlamps. Ideally, the system candistinguish between headlamps of oncoming vehicles, tail lamps offorward vehicles, and non-vehicle light sources. Automatic headlampcontrol systems are described in U.S. Pat. Nos. 5,837,994, 6,008,486,and 6,049,171; U.S. patent application Ser. No. 09/528,389; and U.S.patent application Ser. No.______ (Attorney Docket No. GEN10 P385),entitled “System for Controlling Exterior Vehicle Lights,” filed on Mar.5, 2001, all to Stam et al., commonly assigned with the presentinvention, and hereby incorporated by reference. In these systems, twoimage subwindows are acquired through two different colored lenses. Eachsubwindow images the same scene, but through different color filters.Light sources detected in one subwindow are compared to light sourcesdetected in the other subwindow to determine the relative ratio of eachcolor light in the object. This information is used to distinguish thered light from tail lamps from the white light of headlamps.

[0048] Using the inventive image processing system for headlamp control,light sources are extracted from an image as the image is received. Alight source within an image may be defined as a set of connectedpixels, all of which have grayscale values above a threshold. Connectedpixels refer to pixels which are adjacent to one another on one side or,optionally, diagonally. An algorithm defining a method for detectinglight sources within an image as each row of the image is being receivedby the processor is illustrated in FIGS. 3 and 4 below. To execute thisalgorithm, three items are stored in memory. First, a segment list isstored containing information regarding segments of the image row beingreceived having pixels exceeding a predetermined threshold (i.e.,connected pixels within a row). As shown in FIG. 3, a segment list mayinclude the row number and the minimum X (Min X) and maximum X (Max X)values, which represent the beginning and ending columns of theidentified segment within the row. The segment list may also include atotal value for the quantitized light levels output from all of thepixels in each segment, a saturation flag which indicates whether any ofthe pixels exceeded a saturation limit, and a merge index. Also storedin memory are red and white light lists. As also shown in FIG. 3, thered and white light lists respectively may include: (1) the minimum Xand Y and maximum X and Y values representing the bounds in terms ofrows and columns of each detected white or red light source; (2) thesize (i.e., number of pixels) of each light source; (3) the type of eachlight source; (4) the saturation flag; (5) the total gray value of eachlight source; (6) the center X and Y values of each light source; (7)the total gray value of each corresponding light source; (8) the X and Ysums; and (9) the next index. As will be described further below, thesegment list may be constructed as the image is read from the imagesensor. This eliminates the need to store any of the image data directlyobtained from the image sensor. Thus, as the image is acquired from theimage sensor, a rough list of segments is stored in the segment list.Then, the list of segments is cleaned up by passing through the list toadjust and complete all values in the list. This may include, forexample, making adjustments for any faulty pixels that are known ordiscovered to exist in the image sensor array. It may also includeadjusting values for row and column numbers at edges of columns.

[0049] The segment list is then traversed to combine segments directlyabove or below each other into a list of lights, each showing thebounding rectangle coordinates, total pixel value, and size. The sum ofX and Y coordinates is also computed. This process may involve merginglights that are adjacent as well as segment information.

[0050] The object or segment extraction (i.e., generating the segmentlist and/or object lists) may be performed by either a main processor105 or in another processor 105′ located near the image sensor (orintegrated into the image sensor). Extracting objects or segments nearimage sensor 101 minimizes the data which must be transmitted over acable (107) between mirror mount 207 and mirror body 210. Conceivably, acamera with an image sensor could be located in a remote part of thevehicle and object or segment data could be transmitted via a bus. In apreferred embodiment, a logic component (i.e., processor 105′) on ornear the image sensor computes the start, stop, and total gray value ofa segment of illuminated pixels in a row. These three parameters aresent from the mirror mount to the mirror body. The processor 105 in themirror body 210 combines these segments with other segments to identifytwo dimensional objects and then applies rules to determine the properaction. In a color image sensor, average color, or the total red, green,and blue (RGB) values are sent to the main processor 105 along with thestart and stop column index.

[0051] The lists are then traversed again, computing the centercoordinates from the X and Y sums and eliminating red lights belowvarious thresholds. The red lights are then sorted by their centercoordinates while the white lights are sorted by their minimum X and Yvalues. The memory used for the X and Y sums can now be used for otherpurposes, such as storing the corresponding white value and centercoordinates.

[0052] The resulting red list is traversed to locate a white light witha bounding rectangle containing the red light's center position. This isdone to determine whether or not the light source that is detected is aheadlight or a tail light.

[0053] The light levels and sizes in the resulting list can then becompared with various criteria to further categorize the light sources.

[0054] Having generally described the method as depicted in FIG. 3,reference is made to FIGS. 4A and 4B, which describe the algorithm inmore detail. The processing proceeds for the image reading with step 304in which data areas including the segment list are initialized and thecommands to acquire an image are sent to the imager. The data that isinitialized is discussed further below. The process then proceeds intowhat is referred to as a “row loop.” The body of this loop processeseach row of image data read from image sensor array 101. Thus, the firststep is to store the row number of image data in the current segment asdepicted in step 306. Next, the routine enters a nested loop referred toin FIG. 4A as the “red loop.” In this loop, each pixel value in the rowis read that is within the subwindow onto which the image is projectedthrough a red or clear filter. A second subwindow is also present in therow onto which the same image is projected through a cyan filter. Therows may thus be effectively divided in two, with the first halfcorresponding to red lights and the second half corresponding to whitelights. It is from this red loop that the red light list is generated.This process begins with step 308, where the first pixel value is read.Processor 105 then determines in step 310 whether the grayscale value ofthe pixel read in step 308 exceeds a threshold. If the grayscale valueof the pixel exceeds a threshold, the routine proceeds to step 312 wherethe grayscale value is added to a sum contained in the current segment.The value of the sum is initialized in step 304 to be zero for eachsegment. Also in step 312, processor 105 determines if the grayscalevalue of the pixel exceeded a saturation limit in which case asaturation flag is set for the current segment in step 312. Processor105 then sets the “state” to “true” indicating that a segment has beenidentified. The “state” is initialized in step 304 as “false.” Theprocedure then advances to step 320 where processor 105 determineswhether all columns of pixels within the row subwindow have been read.Assuming that not all the pixels have been read, the process returns tostep 308 where the next pixel value is read.

[0055] If processor 105 determines in step 310 that the grayscale valuefrom a pixel is not above the threshold, the processor determines instep 314 whether the state is true (i.e., whether or not the prior pixelwas part of an identified segment). If the state is true, the processorproceeds to step 316 and where it sets the last column number as themaximum X value in the current segment.

[0056] Then in step 316, processor 105 increments the segment index topoint to a subsequent segment (i.e., a new “current segment”), testingto assure that the maximum number of segments have not already beenstored. The state is also set to False. After step 316 or if processor105 determined in step 314 that the state is not true, the process flowsto step 318 which stores the current column number as the first columnin the current segment. Note that the column number stored as the firstcolumn is actually one less than the actual first column. Laterprocessing steps take this into account. After step 318, the processflows to step 320 where it is determined whether all of the redsubwindow columns have been processed for the row.

[0057] Once all of the red subwindow columns have been processed for therow, control passes to step 322. In step 322, the state is tested. IfTrue (i.e., the last pixel of the row contained a value over thethreshold), the processor proceeds to step 324. If False, the processingproceeds with step 326.

[0058] In step 324, processor 105 sets the first column to point to thefirst pixel of the white subwindow portion of image sensor array 101,which are treated as extra columns. Also, the segment index isincremented if it is not already at the limit and the state is set to“false.”

[0059] The process then proceeds through a white loop-nested subroutinewhere the second half of the row corresponding to the white subwindow isread and processed. This loop is similar in nature to the red loop withsteps 326-342 corresponding identically to steps 308-324. Because thesame image is imaged onto the two different subwindows of image sensor101, light from light sources outside the vehicle that passes throughboth filters would be detected in the same regions and patterns for thefirst and second halves of the processed row. In a preferred embodiment,the first filter is a red filter, which only allows red light to passwhile the second filter is a cyan filter, which only allows light havinga cyan components to pass through. Thus, a vehicle's tail lights mayappear on the first half of the row in the red subwindow and would notappear in the second subwindow, while light from a vehicle's headlampswould be detected in both subwindows since such light typically exhibitsa spectrum with light components in both the red and cyan portions ofthe spectrum. It will be appreciated, however, that a combination of redand clear filters could be used in place of the combination of red andcyan filters.

[0060] After reading each pixel in the second half of the rowcorresponding to the white loop, and the cleanup steps in steps 340 and342, processor 105 proceeds to checking in step 344 whether all rows ofimage sensor 101 have been processed. If they have not all beenprocessed, the procedure loops back to step 306 to process eachsubsequent row in a similar manner. In this sequence, the segment listis constructed.

[0061] As noted above, once the segment list has been constructed, thewhite light list and the red light list are formulated based upon theinformation in the segment list. Specifically, segments in the segmentlist in adjacent rows and sharing common columns may be merged to defineeither a white or red light that is identified in one of the red orwhite light lists. Based upon the information in the red and white lightlists, processor 105 controls the high or low beam state of thevehicle's headlamps.

[0062] In a second embodiment, objects are again extracted from an imageas the image is received. The object within an image are again definedas a set of connected pixels all of which have grayscale values above athreshold. An algorithm defining a method of detecting connected pixelswithin images as each image is being received is illustrated in FIGS. 5Aand 5B. To execute this algorithm, three items are stored in memory.First, an object list is stored containing information about any objectsthat are detected. This list is implemented preferably as an array ofstructures with elements in each structure containing all necessaryinformation about an object. The table below illustrates an example ofone of the structures. The elements of this table can be used to computethe center of the source after the algorithm is completed. Additionalinformation, such as the top, bottom, left, and right extents of thesource may also be stored. TotalGV The total grayscale value of allpixels in the row Size The total number of pixels in the object TotalXThe sum of the x coordinates of all pixels in the object TotalY The sumof the y coordinates of all pixels in the object Max The maximumgrayscale value of any pixel in the object Merge Index of a object thatthis object is to be merged with initially points to itself

[0063] The next item stored is an array of object indices, the size ofone row of the image being processed. These indices refer to the objectsthat contain the pixels in the row previously processed. The arrayelements are initialized to zero, indicating no light sources above theupper row of pixels. In the following description, the element of thisarray that corresponds to the current column is referred to as the aboveindex. For example, if the pixel above the current pixel is contained inlight source 2, the above index will contain the value 2.

[0064] Finally, a single object index is used to refer to the lightsource of the previous pixel processed, referred to as the “left index.”The left index is initialized to zero at the start of each row. As eachpixel is processed, it is either considered part of light source(numbered greater than zero) or not. At the end of pixel processing, theindex of the light source (0 for no light source) is assigned to boththe left index and row element corresponding to the current column. Theabove index is then obtained from the next column. Those skilled in theart will recognize that the value of the left index could be determinedby referring to the previous above index. Other methods of storingvalues using pointers or addresses may be used as well. The value ofleft index or other values may be stored in registers rather thanprocessor memory.

[0065]FIGS. 5A and 5B show a procedure for processing each pixel ofimage data as it is received from image sensor 101 in accordance withthe second embodiment of the present invention. The procedure beginswith step 400 in which processor 105 receives the gray scale value of apixel within image sensor array 101. In step 402, processor 105determines whether the gray scale value is above a predeterminedthreshold. If the gray scale value does not exceed the threshold,processor 105 performs step 404 whereby it sets the pixel left sourceindex to zero and then sets the pixel above source index to zero in step406. Processor 105 then receives the next pixel (step 408) in the row ofimage sensor 101 being processed. The procedure then moves back throughto step 402 where the processor 105 again determines whether the grayscale value is above a threshold. Until such time that a pixel exceedsthe grayscale value, the procedure loops through steps 400-408.

[0066] Upon detecting a pixel having a grayscale value above thethreshold in step 402, processor 105 then proceeds to step 410 where itdetermines whether the above source index is no longer zero. Initially,the above source index is set to zero such that processor 105 wouldproceed to step 412 where it determines whether the left source index isno longer zero. Again, initially, the left source index would be equalto zero such that processor 105 would proceed to step 414 in which itcreates a new source in the source list and adds the current pixelinformation including the row and column number and the grayscale value.Each time processor 105 creates a new source, it increments a new sourceindex such that each source that is identified has its own unique index.After step 414, processor 105 sets the left and above index equal to thenew source index (steps 415 and 416) prior to proceeding through steps408 and 402 to determine whether the next pixel has a grayscale valueabove the threshold. Assuming the grayscale value is above thethreshold, processor 105 checks in step 410 whether the above sourceindex is no longer zero.

[0067] In this case, the above index now refers to the next pixel in therow array and equals 0 (no source). The left index, set in the previouspixel, is set to point to the current light source. This results insteps 410 and 412 passing control to step 430 where the current pixelinformation is added to this light source. The row array valuecorresponding to this column is set to this value in step 432.

[0068] In another case where the previous pixel was below the threshold(the left index=0) and the pixel above the current part of pixel is partof a light source (the above index ≠0), steps 410 and 418 pass controlto step 420. The current pixel information is added to the sourcereferenced to by the above index. The left index is then set to thevalue of the above index in step 422.

[0069] The remaining condition, where the above index and left index arenot equal to zero, results in execution of steps 424-428. These stepsset merge pointers that link adjacent light sources. In the postprocessing, these pointers will be used to combine the light sources.First, in step 424, the source pointed to by the merge pointer of thesource referenced by the above index is set to the left index. Althoughit is theoretically possible for the above index to be already mergedwith another source, further study may show this step to be unnecessary,since the effects of not merging these sources may be smaller than thetime it takes to do this extra assignment. Then in step 425, the mergepointer of the light source referenced by the above index is set to theleft index. If the light sources are the same, setting the merge pointerwill have no effect. Following this, the current pixel information isadded to the light source referenced by the left index. Finally, the rowarray element for this column is set to the left index.

[0070] When a pixel is detected as having a grayscale value below thethreshold (in step 402) and when the prior pixel had a value thatexceeded the threshold, the left source index and the above source indexare reset to zero (steps 404 and 406) such that when the next pixel isdetected that exceeds the threshold, it will be assigned to a new source(step 414). The process thus continues to loop through this imagereception and processing phase to generate the working object list.

[0071] At the end of the image reception and processing phase, theworking object list must be converted into a final object list. First,objects which must be merged are merged by adding all of the values fromeach object into one new object. A new object list is created containingthe merged information. Additionally, the TotalX and TotalY variablesare divided by the size variable to yield the X and Y center coordinatesof the object.

[0072] The examples presented assume a serial control architecture asdescribed in the above-referenced U.S. Pat. No. 5,990,469 where pixelvalues are received serially in the Receive Data Register (RDR) of theSynchronous Serial Interface peripheral of the Motorola microcontroller.With this configuration, there is sufficient time between the receptionof subsequent pixels and subsequent rows to implement the stepsoutlined. However, with other controllers, it may be necessary to slowdown the pixel transmission rate to achieve this while with other fastercontrollers, the pixel rate can be increased or additional processingcan be accomplished between pixels. If insufficient time is available tocomplete the post-row processing step before the receipt of the nextrow, it is possible to store the row source list for each row until theend of image acquisition. This method still has the potential forsubstantial memory savings over storing the entire image. One skilled inthe art will also appreciate that this method may be adapted to otherimage transmission schemes, such as a parallel image bus.

[0073] The above method of detecting objects can be modified to supportthe headlamp imaging function. In this modification, the method isimplemented twice, once for each color window and two object lists arecreated and compared. Alternatively, if there is highly accurate spatialcorrelation between pixels in one subwindow and pixels in the othersubwindow, the algorithm can be implemented once on one subwindow andwhen the corresponding row from the other subwindow is received, thecorresponding pixel total grayscale values can be tallied and includedin the row source list.

[0074] Analyzing images to produce a list of objects in the image hasmany advantages. Once this list is analyzed, the brightness, location,and other properties can be checked to determine if a response to thepresence of these objects in the image is necessary. For example, in theheadlamp control application, the presence of an object with a certaintotal grayscale value in a certain region of the image may require thehigh beams to be turned off.

[0075] As discussed above, the control circuit that is coupled to theimage array sensor for processing the image of the scene obtained by theimage array sensor may include one or more processors. Referring back toFIG. 2, a first processor 105 may be mounted within mirror bezel 200whereas a second processor 105′ may be mounted to a circuit board withinmirror mount 207. In this manner, second processor 105′ could receiveand process the image data as it is read and develop the segment list orthe object list in the above-noted processing procedures and thentransfer these lists to first processor 105 for subsequent processing,such as the development of the white and red light lists. Secondprocessor 105′ could alternatively be used to create the red and whitelight lists and then transmit that information to first processor 105that would analyze these lists and generate control signals to controlthe headlamps of the vehicle. By splitting the processing power in thismanner, the amount of information that needs to be transmitted fromwithin mirror mount 207 to mirror bezel 200 may be minimized therebyallowing first processor 105 to perform other processing tasks such ascontrolling the reflectivity of mirror 203.

[0076] As also explained above, the image processing system 100 of thepresent invention may be used for various applications, such as headlampcontrol and rain sensing. Because the same imaging system may be usedfor both these applications, the control circuit may be configured toprocess the image data for both such applications simultaneously so asto control the vehicle headlamps and the windshield wipers based uponinformation obtained using the image sensing system of the presentinvention. Additionally, the image processing system of the presentinvention may be used in a system for generating a collision avoidancewarning when the vehicle is too close behind another vehicle.Additionally, the images obtained from the image processing system ofthe present invention could be used by an adaptive cruise controlsystem, which varies the speed at which the cruise control is set basedupon the proximity of the vehicle to other vehicles in front of thevehicle. Further, the images could be used in a system that generates alane departure indication signal when it is detected that the vehiclehas departed from its present lane. Such a signal could be used forvarious purposes, such as providing the driver with a lane departurewarning. As with the combination of the rain detector and headlampcontroller features in a common control circuit, any of the variousapplications noted above may be combined such that image data obtainedfrom the inventive image processor system may be processed by a commoncontrol circuit, which may include one or more processors to therebygenerate a collision avoidance warning, to control the speed of thevehicle, to control the vehicle headlamps, to control the vehiclewindshield wipers, to control the vehicle climate control system, and/orto generate a lane departure indication signal.

[0077] The present invention can be used with a color image sensor toprovide additional information about the color of objects in the scene.In the embodiments disclosed above, color (red vs. white) is sensed byusing lenses of two different colors forming two images on differenthalves of the array. As an alternative a checkerboard or mosaic patternmay be deposited on to the array such that neighboring pixels areexposed to separate bands of light. A technique for depositinginterference filters of different colors onto neighboring pixels isdisclosed in U.S. Pat. No. 5,711,889 to Philip E. Buchsbaum, the entiredisclosure of which is incorporated herein by reference. In oneembodiment, neighboring pixels are alternatively coated with a redfilter (R) and no filter (clear (C)) as illustrated in the table below.

[0078] In this embodiment the optics are slightly defocused such thatthe spot size from a distant point light source covers at least twopixels. In this way, an accurate reading of the red component of theobject can be determined. The inventors have discovered that commoncolor filter array technologies, typically employing polymer filters,will not withstand direct focused sunlight. In many automotiveapplications, the sun may be focused onto the array if a vehicle istraveling or parked such that the sun is within the field of view of thecamera. Interference filters are far more robust and reflect theunwanted spectral bands of light rather than absorb them. As a result,their use overcomes the limitations of the prior filtering technologiesand allows the construction of an automotive camera. These filters canbe used not only with cameras which are used in applications whichcontrol vehicle equipment but also in applications where images areacquired and displayed to the driver for visual assistance.

[0079] In another embodiment, three-color interference filters can beused to construct a red, green, and blue (RGB) pixel array (or theircomplements) as illustrated in the table below.

[0080] A full color value for each pixel is determined by using thecolor of the current pixel and interpolating the other two colors fromneighboring pixels with different filter colors. Techniques forperforming this interpolation are well known in the art. In a simplerscheme, groups of four pixels are treated as one “super pixel.” The lensis defocused enough such that the image of a point light source isblurred over a 2×2 block of pixels. For each block of 2×2 pixels thered, green, and blue colors components are determined from theindividual pixels. This data can be represented as either three separatevalues or as an intensity and color value.

[0081] The use of a 2×2 super pixel simplifies processing and reducesthe total number of values stored. This technique can be combined withany of the other techniques in an application requiring color imaging.For an application such as a high beam headlamp control system,traditional color interpolation can be used near the center of the imagefor increased resolution and the technique of using super pixels can beused away from center. Super pixels larger than 2×2 blocks can be usedwhere substantially decreased resolution is acceptable. Instead of red,green, and blue, the complementary colors of magenta, cyan, and yellowcould likewise be used.

[0082] By reducing the amount of memory space that need be allocated forprocessing the image data, either the amount of memory as a whole may bereduced or more of the memory may be used for storing light listhistories or for other processing functions such as compass processingfunctions, electrochromic mirror control functions, telematicsfunctions, etc. Thus, it is conceivable that processor 105 may be usedfor such other functions.

[0083] The above description is considered that of the preferredembodiments only. Modifications of the invention will occur to thoseskilled in the art and to those who make or use the invention.Therefore, it is understood that the embodiments shown in the drawingsand described above are merely for illustrative purposes and notintended to limit the scope of the invention, which is defined by thefollowing claims as interpreted according to the principles of patentlaw, including the doctrine of equivalents.

The invention claimed is:
 1. An imaging system for controlling vehicleequipment comprising: an image array sensor including a plurality ofpixels, each said pixel operable to generate a signal indicative of theamount of light received on the pixel; an analog to digital converterfor quantizing said signals from said pixels into a digital value; and amemory including a plurality of allocated storage locations for storingsaid digital values from said analog to digital converter, wherein thenumber of allocated storage locations in said memory is less than thenumber of pixels in said image array sensor.
 2. The imaging system ofclaim 1 and further including a control circuit coupled to said imagearray sensor for controlling the brightness of vehicle headlamps inresponse to the brightness of objects detected in a scene imaged by saidimage array sensor.
 3. The imaging system of claim 1 and furtherincluding a control circuit coupled to said image array sensor forcontrolling vehicle windshield wipers in response to the detection ofmoisture on the vehicle windshield as imaged by said image array sensor.4. The imaging system of claim 1 and further including a control circuitcoupled to said image array sensor for processing the image of the sceneobtained from said image array sensor to generate a collision avoidancewarning.
 5. The imaging system of claim 1 and further including acontrol circuit coupled to said image array sensor for processing theimage of the scene obtained from said image array sensor to generate alane departure indication signal.
 6. The imaging system of claim 1 andfurther including a control circuit coupled to said image array sensorfor processing the image of the scene obtained from said image arraysensor to control the speed of the vehicle.
 7. A control system tocontrol the headlamps of a vehicle comprising: an image array sensorincluding a plurality of pixels, each said pixel operable to generate asignal indicative of the amount of light received on the pixel; anoptical system configured to image the scene forward of the controlledvehicle onto said image array sensor; an analog to digital converter forquantizing said signals from said pixels into a digital value; and acontrol circuit for processing the image of the scene obtained from saidimaging system and for controlling the headlamps in response to objectsdetected in the processed scene, said control circuit including a memoryincluding a plurality of allocated storage locations for storing saiddigital values from said analog to digital converter, wherein the numberof allocated storage locations in said memory is less than the number ofpixels in said image array sensor.
 8. The headlamp control system ofclaim 7, wherein said control circuit generates a segment listidentifying segments of adjacent ones of said pixels that generate asignal having a grayscale value above a threshold as the signals arereceived from said pixels.
 9. The headlamp control system of claim 8,wherein said control circuit generates a list of white light sources inthe imaged scene and a list of red light sources in the imaged scenebased on information in said segment list.
 10. The headlamp controlsystem of claim 7, wherein said control circuit generates a list ofobjects in the imaged scene by linking adjacent pixels that generatesignals having a grayscale value above a threshold as the pixels arereceived from said image array sensor.
 11. The headlamp control systemof claim 7, wherein said control circuit includes a first processor forprocessing the signals received from said image sensor, and a secondprocessor coupled to said first processor for performing additionalprocessing and for controlling the brightness of the headlamps.
 12. Theheadlamp control system of claim 11, wherein said first processorgenerates a segment list identifying segments of adjacent ones of saidpixels that generate a signal having a grayscale value above a thresholdas the signals are received from said pixels.
 13. The headlamp controlsystem of claim 12, wherein said second processor receives the segmentlist from said first processor and identifies objects in the imagedscene based on information in said segment list.
 14. The headlampcontrol system of claim 13, wherein said second processor generates alist of white light sources in the imaged scene and a list of red lightsources in the imaged scene based on information in said segment list.15. A control system to control the headlamps of a vehicle comprising:an image array sensor including a plurality of pixels, each said pixeloperable to generate a signal indicative of the amount of light receivedon the pixel; an optical system configured to image the scene forward ofthe controlled vehicle onto said image array sensor; and a controlcircuit for processing the image of the scene obtained from said imagingsystem and for controlling the headlamps in response to objects detectedin the processed scene, wherein said control circuit generates a segmentlist identifying segments of adjacent ones of said pixels that generatea signal having a grayscale value above a threshold as the signals arereceived from said pixels.
 16. The headlamp control system of claim 15,wherein said control circuit generates a list of white light sources inthe imaged scene and a list of red light sources in the imaged scenebased on information in said segment list.
 17. The headlamp controlsystem of claim 16, wherein said control circuit includes a memoryincluding a plurality of allocated storage locations for storing saiddigital values from said analog to digital converter, wherein the numberof allocated storage locations in said memory is less than the number ofpixels in said image array sensor.
 18. An inside rearview mirrorassembly for a vehicle comprising: a mirror mount adapted to be mountedinside the vehicle in a location proximate to or on the front windshieldof the vehicle; a mirror bezel coupled to said mirror mount; a mirrormounted in said mirror bezel; an imaging system mounted to said mirrormount and configured to image the scene forward of the vehicle; and acontrol circuit electrically coupled to said imaging system forprocessing the image of the scene obtained from said image array sensorand for performing a predetermined function in response to objectsdetected in the processed scene, wherein at least a portion of saidcontrol circuit is mounted to said mirror mount.
 19. The inside rearviewmirror assembly of claim 18, wherein at least a portion of said controlcircuit is mounted in said mirror bezel.
 20. The inside rearview mirrorassembly of claim 18, wherein said control circuit includes apreprocessing component that identifies objects in the image obtained bythe imaging system and that generates a list of objects and the relativebrightness of the objects, and a control component that controls thebrightness of the headlamps as a function of the identified objects andtheir brightness.
 21. The inside rearview mirror assembly of claim 20,wherein said control component is coupled to said preprocessingcomponent by a flex circuit.
 22. The inside rearview mirror assembly ofclaim 20, wherein said preprocessing component is mounted to said mirrormount.
 23. The inside rearview mirror assembly of claim 20, wherein saidcontrol component is mounted in said mirror bezel.
 24. An imaging systemfor a vehicle comprising: an image array sensor; an optical systemconfigured to image the scene forward of the controlled vehicle ontosaid image array sensor; and a control circuit for coupling to saidimage array sensor for processing the image of the scene obtained fromsaid image array sensor to control the vehicle headlamps in response toobjects detected in the processed scene, said control circuit furtherprocesses the scene obtained from said image array sensor to perform atleast one of the following functions: (a) to generate a collisionavoidance warning; (b) to control the speed of the vehicle; (c) togenerate a lane departure indication signal; and (d) to sense rain. 25.The imaging system of claim 24, wherein said control circuit furtherperforms the function of controlling vehicle windshield wipers inresponse to information obtained from said image array sensor.
 26. Theimaging system of claim 24, wherein said control circuit furtherperforms the function of controlling the vehicle climate control systemin response to information obtained from said image array sensor. 27.The imaging system of claim 24, wherein said control circuit furtherperforms the function of controlling the reflectivity of the vehiclerearview mirror.
 28. The imaging system of claim 24, wherein saidcontrol circuit includes a single processor for performing saidfunctions.
 29. An imaging device for a vehicle comprising: an imagesensor having a plurality of pixels arranged in an array; and amulti-layer interference filter disposed over said pixel array, saidmulti-layer interference filter being patterned so as to provide filtersof different colors to neighboring pixels or groups of pixels.
 30. Theimaging device of claim 29, wherein said multi-layer interference filterhas a checkerboard pattern of alternating colored filters with adifferent color filter for each adjacent pixel.
 31. The imaging deviceof claim 30, wherein said alternating colors are red and clear.
 32. Theimaging device of claim 29, wherein said multi-layer interference filterhas a mosaic pattern of red, green, and blue color, with differentcolors for each adjacent pixel.
 33. The imaging device of claim 29,wherein said multi-layer interference filter has a mosaic pattern ofmagenta, cyan, and yellow color, with different colors for each adjacentpixel.
 34. The imaging device of claim 29, wherein said interferencefilters reflects undesired spectral bands of light.